home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SMEGUPD1.ZIP / KILLSMEG.ZIP / KILLSMEG.ASM next >
Assembly Source File  |  1995-05-19  |  19KB  |  749 lines

  1. ;KillSMEG (c) 1994 Stormbriner, Phalcon/Skism
  2. ;Finds and disinfects the original SMEG viruses (Pathogen and Queeg)
  3.  
  4. ;Author assumes NO responsibility for any damages caused by this program
  5. ;or by the SMEG viruses themselves.  This utility is simply made to find it,
  6. ;and may or may not work as it is supposed to.  No garuantees.
  7.  
  8. ;First phase is to look for time signatures.  The seconds in any Queeg
  9. ;infected file (unless something else has changed timestamp after infection)
  10. ;is 56 seconds (1c in bits 0-4 of the time sig).  All following Checks are
  11. ;done regardless of the time sig check.  Pathogen marks infections by making
  12. ;the high byte in the date > 0c8h
  13.  
  14. ;Second Phase on each file is to Check if it's an .EXE or a .COM.
  15.  
  16. ;Third phase is to trace the program until an invalid condition is found or
  17. ;the virus is detected.
  18.  
  19. ;Finally, the user is asked if s/he wishes to disinfect the virus, and
  20. ;the file is cleaned.
  21.  
  22. Strengths:
  23. ;       VERY reliable detection rate from my testing.
  24. ;
  25. ;       Currently only free program capable of disinfecting SMEG viruses, 
  26. ;       especially from .EXE files.
  27. ;
  28. ;       Comes with full source code.
  29.  
  30. ;Weaknesses:
  31. ;       Third phase is slow(!!!), and actually executes part of program, 
  32. ;       although it is careful not to allow detrimental actions to be taken 
  33. ;       (i.e. viruses cannot go memres, etc.)
  34. ;
  35. ;       Only scans current directory using user filemask.
  36. ;
  37. ;       Disinfection will leave some garbage at the end of files,
  38. ;       as the virus pads its hosts to the paragraph boundaries.
  39. ;       This will cause self-checking programs to choke.
  40.  
  41. .model tiny
  42. .radix 16
  43. .code
  44.         org 100
  45. start:
  46. ReduceMem:
  47.         mov     ah,4a
  48.         mov     bx,(endfinder-start+10f)/10     ;Reduce Memory to that needed
  49.         int     21
  50.  
  51.         mov     sp,offset TopStack              ;Set STack within memory
  52.  
  53.         mov     ah,09
  54.         mov     dx,offset IntroMSG
  55.         int     21
  56.  
  57.         cmp     byte ptr ds:[80],1
  58.         ja      CopyFilename
  59.         mov     ah,09
  60.         mov     dx,offset Instructions
  61.         int     21
  62.         mov     ax,4c00
  63.         int     21
  64. CopyFilename:
  65.         mov     si,82
  66.         mov     di,offset Filenamebuf
  67.     CopyFN:
  68.         lodsb
  69.         cmp     al,0dh
  70.         je      doneCFN
  71.         stosb
  72.         jmp     CopyFN
  73. doneCFN:
  74.         xor     al,al
  75.         stosb
  76.  
  77. ComSearch:
  78.         mov     ah,4e
  79.         mov     dx,offset FilenameBuf
  80.         mov     cx,07
  81.   FindFirstNext:        
  82.         int     21
  83.         jnc     SearchGood
  84.         jmp     NoMoreCOMS
  85.   SearchGood:
  86.         call    notifycheck
  87.  
  88.         mov     cx,ds:[96]
  89.         and     cl,1f
  90.         cmp     cl,1c                   ;Check time stamp (56 seconds)
  91.         jne     AfterTimeCheck1
  92.         call    SuspiciousTime
  93.   AfterTimeCheck1:
  94.         mov     cx,ds:[98]
  95.         cmp     ch,0c8
  96.         jb      AfterTimeCheck
  97.         call    PathTime
  98.  
  99.   AfterTimeCheck:
  100.         mov     ax,3d00
  101.         mov     dx,9e
  102.         int     21
  103.         jnc     ATCGood
  104.         jmp     ErrorOpen
  105.   ATCGood:
  106.         xchg    bx,ax
  107.         mov     dx,offset EXECCheck
  108.         mov     cx,4
  109.         mov     ah,3f
  110.         int     21
  111.         mov     ah,3e
  112.         int     21                              ;Close File
  113.         mov     ax,word ptr ds:[ExecCheck]
  114.         xor     ah,al
  115.         cmp     ah,('M' xor 'Z')                ;Check if it's a com or exec
  116.         je      ISEXE
  117.         push    cs
  118.         pop     es
  119.         mov     di,offset JmpByte
  120.         mov     si,offset ExecCheck             ;Save Jump
  121.         movsb
  122.         movsw
  123.         mov     byte ptr ds:[COMEXE],0
  124.         jmp     short OtherChecks
  125.     ISEXE:        
  126.         mov     byte ptr ds:[COMEXE],1        
  127.   OtherChecks:        
  128.         mov     Infected,0                      ;Initialize to not infected
  129.         mov     TraceDone,0
  130.         call    LoadAndCheckFile                ;Trace file
  131.         cmp     Infected,1
  132.         jne     FindAnotherFile
  133.                
  134.         call    PrintFilename
  135.         cmp     Knownvir,1
  136.         je      DisinfectProg
  137.         mov     ah,09
  138.         mov     dx,offset NewVar
  139.         int     21
  140.         jmp     FindAnotherFile
  141.  
  142. DisinfectProg:
  143.         mov     ah,09
  144.         mov     dx,offset InfectedMSG
  145.         int     21
  146.  
  147.         xor     ax,ax
  148.         int     16
  149.         push    ax
  150.         mov     dx,offset DoneChecking
  151.         mov     ah,09
  152.         int     21
  153.         pop     ax
  154.         or      al,20
  155.         cmp     al,'y'
  156.         jne     FindAnotherFile
  157.    Disinfect:
  158.         cmp     comexe,1
  159.         je      DisEXE
  160.         call    DisinfCom
  161.         jmp     short FindAnotherFile
  162.    DisEXE:
  163.         call    DisinfExe
  164.   FindAnotherFile:
  165.         mov     ah,4f
  166.         jmp     FindFirstNext
  167.  
  168. ErrorOpen:
  169.         call    PRintFilename
  170.         mov     ah,09
  171.         mov     dx,offset OpenError
  172.         int     21
  173.         jmp     FindAnotherFile
  174.  
  175. NoMoreCOMS:
  176.         mov     ax,4c00
  177.         int     21
  178.  
  179. SuspiciousTime:        
  180.         call    PrintFilename
  181.         mov     ah,09
  182.         mov     dx,offset TIMEMSG
  183.         int     21
  184.         ret
  185. PathTime:
  186.         call    printfilename
  187.         mov     ah,09
  188.         mov     dx,offset pathtimemsg
  189.         int     21
  190.         ret
  191.  
  192.  
  193. NotifyCheck:
  194.         
  195.         mov     dx,offset Checking
  196.         mov     ah,09
  197.         int     21
  198.         call    PrintFileName
  199.         mov     dx,offset DoneChecking
  200.         mov     ah,09
  201.         int     21
  202.         ret
  203.  
  204.  
  205. PrintFilename:        
  206.         mov     si,9e
  207.   PrintFN:        
  208.         lodsb
  209.         or      al,al
  210.         jz      doneprintfn
  211.         mov     ah,02
  212.         mov     dl,al
  213.         int     21
  214.         jmp     Printfn
  215.     DonePrintFN:
  216.         ret
  217.  
  218. LoadAndCheckFile:
  219.         push    cs
  220.         pop     ds
  221.         mov     ax,ds:[2c]
  222.         mov     EnvSeg,ax
  223.         mov     ax,ds
  224.         mov     word ptr [CommandTail+2],ax
  225.         mov     word ptr [FCB1+2],ax
  226.         mov     word ptr [FCB2+2],ax
  227.         mov     ax,offset ParmData
  228.         mov     word ptr [CommandTail],ax
  229.         mov     word ptr [FCB1],ax
  230.         mov     word ptr [FCB2],ax
  231.  
  232.         mov     ax,3501
  233.         int     21
  234.         mov     IP01,bx
  235.         mov     CS01,es         ;Get int 1 vector
  236.  
  237.         mov     ax,2501
  238.         mov     dx,offset Int01  ;And set it
  239.         int     21
  240.         mov     ax,ss
  241.         mov     Oldss,ax
  242.         mov     oldsp,sp
  243.         push    cs
  244.         pop     es
  245.  
  246.      LoadFile:
  247.         mov     ax,4b01
  248.         mov     bx,offset ParmBlock
  249.         mov     dx,9e
  250.         int     21
  251.         jc      ErrorExecute
  252.     SetupExec:        
  253.         push    cs
  254.         pop     ds
  255.         mov     ax,2522
  256.         mov     dx,offset ExecuteTerminated
  257.         int     21                              ;Set Termination address
  258.  
  259.         mov     ah,62
  260.         int     21
  261.         push    bx bx
  262.         pop     es ds
  263.         
  264.         mov     word ptr cs:[StartDS],bx
  265.  
  266.         mov     ax,cs
  267.         mov     word ptr ds:[0a],offset ExecuteTerminated
  268.         mov     word ptr ds:[0c],ax                      ;Set Termination Address
  269.         
  270.         cli
  271.         mov     ax,word ptr cs:[NewStack+2]
  272.         mov     ss,ax
  273.         mov     sp,word ptr cs:[NewStack]
  274.         sti
  275.  
  276.         pushf
  277.         pop     ax
  278.         or      ax,0100
  279.         xor     bx,bx
  280.         xor     cx,cx
  281.         xor     dx,dx
  282.         mov     si,100
  283.         xor     di,di
  284.         xor     bp,bp
  285.         push    word ptr cs:[NewCS]
  286.         push    word ptr cs:[NewIP]
  287.         push    ax
  288.         popf
  289.         retf
  290.  
  291. ExecuteTerminated:
  292.         cld
  293.         pushf
  294.         pop     ax
  295.         and     ax,not 100      ;ditch trapflag
  296.         push    ax
  297.         popf
  298.         cli
  299.         mov     ax,cs:[OldSS]
  300.         mov     ss,ax
  301.         mov     sp,cs:[OldSP]
  302.         sti
  303.         lds     dx,dword ptr cs:[IP01]
  304.         mov     ax,2501
  305.         int     21
  306.         push    cs cs
  307.         pop     es ds
  308.  
  309.         mov     ah,1a
  310.         mov     dx,80                   ;Reset DTA
  311.         int     21
  312.    ErrorExecute:
  313.         ret
  314.  
  315. OldSS   dw      0
  316. OldSP   dw      0
  317.  
  318.  
  319. Int01:
  320.         cld
  321.         push    bp
  322.         mov     bp,sp
  323.         add     bp,2
  324.         push    ax bx cx dx es ds si di
  325.         cmp     cs:TraceDone,1
  326.         je      DOneInt01
  327.         call    CheckESDS   
  328.         call    CheckOPCode
  329.         jne     DoneInt01
  330.         call    InitScanString
  331.         call    ScanMemory   
  332.         call    InitScanString
  333.         
  334.    DoneInt01:
  335.         pop     di si ds es dx cx bx ax
  336.         pop     bp
  337.         iret
  338.  
  339. InitScanString:
  340.         push    ds si cx
  341.         push    cs
  342.         pop     ds
  343.         mov     si,offset QueegScan1
  344.         mov     cx,EndScan1-QueegScan1
  345.    DecryptString:        
  346.         xor     byte ptr [si],42
  347.         inc     si
  348.         loop    DecryptString
  349.         pop     cx si ds
  350.         ret
  351.  
  352. TerminateProgram:
  353.         mov     byte ptr cs:[TraceDone],1
  354.         mov     ax,4c00
  355.         int     21
  356.  
  357. CheckOpCode:
  358.         mov     si,[bp+2]
  359.         mov     ds,si
  360.         mov     si,[bp]
  361.         cmp     byte ptr dS:[si],0cdh
  362.         je      NonvalidOp
  363.         cmp     byte ptr ds:[si],0eah
  364.         je      NonvalidOp
  365.         cmp     byte ptr ds:[si],09ah
  366.         je      NonvalidOp
  367.         cmp     byte ptr ds:[si],0abh
  368.         je      NonvalidOp
  369.         cmp     byte ptr ds:[si],0adh
  370.         je      NonvalidOp
  371.         mov     al,byte ptr ds:[si]
  372.         and     al,0f0
  373.         cmp     al,60
  374.         je      NonvalidOp
  375.         cmp     al,90
  376.         je      NonvalidOp
  377.         cmp     al,0a0
  378.         je      NonvalidOp
  379.         cmp     word ptr ds:[si],00e8
  380.         jne     ExitOpTest
  381.         cmp     word ptr ds:[si+2],5800
  382.   ExitOpTest:
  383.         ret
  384.  
  385. NonValidOp:
  386.         jmp     TerminatePRogram
  387.  
  388.  
  389. CheckESDS:
  390.         mov     ax,[bp+2]
  391.         cmp     ax,word ptr cs:[NewCS]
  392.         je      CSOkay
  393.         jmp     TerminateProgram
  394. CSOkay:
  395.         mov     ax,[bp+2]
  396.         mov     bx,ds
  397.         cmp     bx,ax
  398.         jne     DSNotEqualCS
  399.   CheckES:        
  400.         mov     bx,es
  401.         cmp     bx,ax
  402.         jne     ESNotEqualCS
  403.   ExitSEGCheck:        
  404.         ret
  405. DSNotEqualCS:
  406.         cmp     bx,word ptr cs:[StartDS]   
  407.         je      CheckES
  408.         mov     byte ptr cs:[TraceDone],1
  409.         jmp     TerminateProgram
  410.    ESNotEqualCS:
  411.         cmp     bx,word ptr cs:[StartDS]
  412.         je      ExitSEGCheck
  413.         mov     byte ptr cs:[TraceDone],1
  414.         jmp     TerminateProgram
  415.  
  416. ScanMemory:
  417.         push    cs
  418.         pop     ds
  419.         mov     si,offset QueegScan1
  420.         mov     di,[bp+2]
  421.         mov     es,di
  422.         mov     di,[bp]
  423.         mov     cx,800
  424.         lodsb        
  425.    SearchForString:        
  426.         repnz   scasb
  427.         jcxz    StringNotFound
  428.         push    ax cx si di 
  429.         mov     cx,0bh
  430.         repz    cmpsb
  431.         jcxz    StringFound
  432.         pop     di si cx ax
  433.         jmp     SearchForString
  434. StringFound:
  435.         pop     di si cx ax
  436. SaveInfo:
  437.         dec     di              ;ES:DI = beginning of virus
  438.         push    es di
  439.         pop     si ds
  440.  
  441. ;ds:si+133       22 c0 75 19 bb 00 01 2e a1
  442.      MakeSureKnowVir:
  443.         cmp     word ptr ds:[si+33],0c022
  444.         jne     NotKnown
  445.         cmp     word ptr ds:[si+39],2e01
  446.         jne     NotKnown
  447.         mov     byte ptr cs:[knownvir],1
  448.         jmp     DoneVarCheck
  449.      NotKnown:
  450.         mov     byte ptr cs:[knownvir],0
  451.      DoneVarCheck:
  452.         mov     bx,si
  453.         sub     bx,100
  454.         
  455.         mov     si,word ptr ds:[bx+13c]
  456.         add     si,bx
  457.         push    cs
  458.         pop     es
  459.         mov     di,offset COMStorage
  460.         movsw
  461.         movsb
  462.         
  463.         mov     si,word ptr ds:[bx+164]
  464.         add     si,bx
  465.         mov     di,offset EXEStack
  466.         movsw
  467.         movsw
  468.         
  469.         mov     si,word ptr ds:[bx+171]
  470.         add     si,bx
  471.         mov     di,offset EXEInstruct
  472.         movsw
  473.         movsw
  474. MarkInfected:
  475.         mov     byte ptr cs:[Infected],1
  476.         call    InitScanString
  477.         jmp     TerminateProgram
  478. StringNotFound:
  479.         ret
  480.  
  481. OutOfMemory:
  482.         mov     dx,offset OOM
  483.  ErrExit:        
  484.         push    cs
  485.         pop     ds
  486.         mov     ah,9
  487.         int     21
  488.         mov     ax,4c02
  489.         int     21
  490.  
  491. ErrorClean:
  492.         mov     dx,offset FileError
  493.         mov     ah,09
  494.         push    cs
  495.         pop     ds
  496.         int     21
  497.         jmp     Dealloc
  498.  
  499. DisinfCom:
  500.         mov     ah,48
  501.         mov     bx,1000
  502.         int     21
  503.         jc      OutOfMemory
  504.         mov     es,ax
  505.         mov     dx,9e
  506.         mov     ax,3d00
  507.         int     21
  508.         jc      ErrorClean
  509.         xchg    bx,ax
  510.         push    es
  511.         pop     ds
  512.         xor     dx,dx
  513.         mov     cx,word ptr cs:[ComJump]
  514.         add     cx,3
  515.         mov     ah,3f
  516.         int     21
  517.         push    ax
  518.         mov     ah,3e
  519.         int     21
  520.         mov     ax,word ptr cs:[COMStorage]
  521.         mov     word ptr ds:[0],ax
  522.         mov     al,byte ptr cs:[ComStorage+2]
  523.         mov     byte ptr ds:[2],al
  524.         push    cs        
  525.         pop     ds
  526.         mov     ah,3c
  527.         xor     cx,cx
  528.         mov     dx,9e
  529.         int     21
  530.         pop     cx        
  531.         jc      ErrorClean
  532.         xchg    bx,ax
  533.  
  534.         push    es
  535.         pop     ds
  536.         mov     ah,40
  537.         xor     dx,dx
  538.         int     21
  539.  
  540.         mov     ah,3e
  541.         int     21
  542.   DeAlloc:
  543.         mov     ah,49
  544.         int     21
  545.         push    cs cs
  546.         pop     es ds
  547.         ret
  548.  
  549. EXEErrorClean:
  550.         mov     dx,offset FileError
  551.         mov     ah,09
  552.         push    cs
  553.         pop     ds
  554.         int     21
  555.         ret
  556.  
  557.  
  558. DisinfEXE:
  559.         int     3
  560.         mov     ah,41
  561.         mov     dx,offset TMPFile       
  562.         int     21
  563.  
  564.         push    cs cs
  565.         pop     es ds
  566.         mov     dx,9e
  567.         mov     ax,3d02        ;open file
  568.         int     21
  569.         jnc     EXECOpenGood
  570.         jmp     EXEErrorClean
  571.      ExecOpenGood:
  572.         xchg    bx,ax
  573.         mov     cx,20
  574.         mov     ah,3f
  575.         mov     dx,offset ExecHeader
  576.         int     21
  577.         mov     di,offset Execheader+0e
  578.         mov     si,offset ExeStack
  579.         movsw
  580.         movsw
  581.         xor     bp,bp
  582.         mov     di,offset execheader+14
  583.         mov     dx,[di+2]               ;DX:AX = new filesize kinda
  584.         mov     ax,[di]
  585.         mov     cl,4
  586.         shl     dx,cl
  587.         adc     bp,0
  588.         add     ax,dx
  589.         adc     bp,0
  590.         mov     dx,bp                   ;DX:AX = filesize w/o header
  591.         mov     cx,word ptr [execheader+08]
  592.         shl     cx,1
  593.         shl     cx,1
  594.         shl     cx,1
  595.         shl     cx,1
  596.         add     ax,cx        
  597.         adc     dx,0                    ;Header now calculated in
  598.         mov     ExeSizeHigh,dx
  599.         mov     ExeSizeLow,ax
  600.         and     ax,1ff                      ;modulo 512
  601.         mov     word ptr [execheader+2],ax
  602.         mov     ax,EXESizeLow
  603.         mov     cx,7
  604.         shl     dx,cl
  605.         mov     word ptr [execheader+4],dx
  606.         mov     cx,9
  607.         add     ax,1ff
  608.         shr     ax,cl
  609.         add     word ptr [execheader+4],ax
  610.         
  611.         mov     si,offset ExeInstruct
  612.         movsw
  613.         movsw
  614.  
  615.         mov     ax,4200
  616.         xor     cx,cx
  617.         xor     dx,dx
  618.         int     21
  619.         mov     ah,40
  620.         mov     dx,offset execheader
  621.         mov     cx,20
  622.         int     21
  623.         mov     ah,3e
  624.         int     21
  625.  
  626.         mov     ah,56
  627.         mov     dx,9e
  628.         mov     di,offset TmpFile       ;Rename file
  629.         int     21
  630.  
  631.         mov     ah,3c
  632.         mov     dx,9e
  633.         xor     cx,cx
  634.         int     21
  635.         mov     Dest,ax
  636.         mov     ax,3d00
  637.         mov     dx,offset TmpFile
  638.         int     21
  639.         mov     Source,ax
  640.         
  641.      CopyLoop:
  642.         mov     cx,400
  643.         cmp     word ptr [EXESizeHIgh],0
  644.         jne     FullSize
  645.         cmp     word ptr [ExeSizeLow],400
  646.         ja      FullSize
  647.         mov     cx,word ptr [ExeSizeLow]
  648.     FullSize:
  649.         sub     word ptr [ExeSizeLow],400
  650.         sbb     word ptr [ExeSizeHigh],0
  651.         mov     ah,3f
  652.         mov     bx,Source
  653.         mov     dx,offset CopyBuffer
  654.         int     21
  655.         
  656.         mov     cx,ax
  657.         mov     ah,40
  658.         mov     bx,Dest
  659.         mov     dx,offset CopyBuffer
  660.         int     21
  661.  
  662.         cmp     ax,400
  663.         je      CopyLoop
  664.  
  665. CloseUP:
  666.         mov     ah,3e
  667.         mov     bx,Dest
  668.         int     21
  669.         mov     ah,3e
  670.         mov     bx,Source
  671.         int     21
  672.  DoneDis:
  673.         mov     ah,41
  674.         mov     dx,offset TMPFile       
  675.         int     21
  676.         ret
  677.  
  678. Source   dw      0
  679. Dest    dw      0
  680. OldInt01:
  681.         IP01    dw      0
  682.         CS01    dw      0
  683.  
  684. TraceDone       db      0
  685. StartDS         dw      0
  686.  
  687.  
  688. ParmBlock:
  689.    EnvSeg       dw      0
  690.    CommandTail  dd      0
  691.    FCB1         dd      0
  692.    FCB2         dd      0
  693.    NewStack     dd      0
  694.    NewIP        dw      0
  695.    NEWCS        dw      0
  696.  
  697. Tmpfile         db      'KQTMP',0
  698. NewVar          db      ' - New Variant of SMEG!',0a,0dh,24
  699. FileError       db      'Sorry, File Error.',07,0a,0dh,24
  700. OOM             db      'Sorry, Out Of Memory',07,0a,0dh,24
  701. Checking        db      'Checking $'
  702. OpenError       db      ' - Error Opening.'
  703. DoneChecking    db      0a,0dh,24
  704. TimeMSG         db      ' - Time stamp is suspicious of SMEG.Queeg signature.',0a,0dh,24
  705. pathtimemsg     db      ' - Time stamp is suspicious of SMEG.Pathogen signature.',0a,0dh,24
  706. InfectedMSG     db      ' - INFECTED WITH SMEG!',0a,0dh
  707.                 db      'Disinfect (y/N)?',7,24
  708. IntroMSG        db      0a,0dh,'KillSMEG (c) 1994 Stormbringer, Phalcon/Skism.',0a,0dh
  709.                 db      'Finds and disinfects the 2 known SMEG viruses in the current directory.',0a,0dh,24
  710.                 
  711. Instructions:                
  712.                 db      'Usage :    KILLSMEG Filemask (COM once, then EXE once is recommended)',0a,0dh
  713.                 db      'Example:   KILLSMEG *.COM',0a,0dh,24
  714.  
  715. QueegScan1:
  716. db 0E8 xor 42, 00 xor 42, 00 xor 42, 58 xor 42, 0FE xor 42, 0CC xor 42
  717. db 0B1 xor 42, 04 xor 42, 0D3 xor 42, 0E8 xor 42, 08C xor 42, 0CBh xor 42      ;Initializing Code
  718. EndScan1:
  719. ;QueegScan2:
  720. ;db 0B8, 0EF, 18, 0CDh, 21, 3Dh, 10, 0E7, 75, 01, 0C3, 0E8    ;Installation Check
  721.  
  722.  
  723. ParmData        db      40 dup(0)
  724. knownvir        db      0
  725. Jmpbyte         db      0
  726. COMJump         db      0,0
  727.  
  728. Infected        db      0
  729. COMEXE          db      0                       ;0 for COM, 1 for EXE
  730. EXECCheck       dw      0,0
  731.  
  732. COMStorage      db      0,0,0
  733. EXEStack        dd      0
  734. EXEInstruct     dd      0
  735.  
  736. ;0f9d-SP  0f9b-SS  0fa0-IP:CS
  737. ExeSizeLow      dw      0
  738. EXESizeHigh     dw      0
  739.  
  740.  
  741. Filenamebuf     db      80d dup (?)
  742. ExecHeader      db      20 dup(?)
  743. CopyBuffer      db      400 dup(?)
  744. StackBuffer db  1000 dup(?)
  745. TopStack:
  746.  
  747. endfinder:
  748. end start
  749.